home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Programming / AD Programmer package / Programming Examples / Read Me!
Encoding:
Text File  |  1992-10-11  |  1.9 KB  |  21 lines  |  [TEXT/ttxt]

  1. Programming Changes for After Dark 2.0w
  2.  
  3. None.
  4.  
  5. Programming Changes for After Dark 2.0v
  6.  
  7. None.
  8.  
  9.  
  10. Programming Changes for After Dark 2.0u
  11.  
  12. After Dark 2.0u includes an important change for programmers.  In previous versions of After Dark we included source code for playing sound in After Dark modules.  Unfortunately this code included bugs which, though minor, required getting a fixed version of the code and a recompilation your module.  This was problematic for us too.  When a change was made in the sound code every module that used sound had to be updated and recompiled.  Furthermore users would need a new version of the all the sound modules.
  13.  
  14. To fix this problem we have placed the code that plays sound inside of After Dark.  The interface to playing sound is the same as before except the actual routine is inside After Dark.  Now if a problem is found with the sound code we only need to update After Dark and it will fix the problem with all sound modules.  In the future we hope add other services through this mechanism.
  15.  
  16. To use sound in a module you will use two libraries:  Sound and EntryPoints.    The Sound library contains the callback routines to After Dark for the sound calls.  The EntryPoints library sets up the callback routines between the sound library and After Dark.  If you are using MPW C, MPW Pascal or Think Pascal use the libraries EntryPoints.o and Sound.o.  If you are using Think C use the libraries EntryPoints.π and Sound.π.  There is one minor change to the calling interface.  The OpenSound() routine now takes “params” as a parameter.
  17.  
  18. Since your module will only work with After Dark 2.0u or later you must check for the presence of the callback routines.  To do this we have defined a bit in the systemConfig field of GMParamBlock.  Bit 14 is set to 1 if the callback routines are present.  In DoInitialize() your module should check this bit before attempting to play sound.
  19.  
  20. If you have any questions or problems feel free to call us.
  21.